<?php
/**
 * Created by PhpStorm.
 * User: Lee
 * Date: 2019/12/19
 * Time: 16:12
 */
namespace App\Http\Request\System\Dic;

use App\Common\Utils\BaseRequest;

class AddRequest extends BaseRequest {
    public function rules() {
        $rules = [
            'diccode' => 'required|max:30',
            'dicname' => 'required|max:60',
            'dicmemo' => 'max:50',
        ];

        return $rules;
    }

    public function messages() {
        $messages = [
            'diccode.required' => '字典编码不能为空',
            'diccode.max' => '字典编码长度不能超过30',
            'dicname.required' => '字典名称不能为空',
            'dicname.max' => '字典名称长度不能超过60',
            'dicmemo.max' => '字典备注长度不能超过50',
        ];

        return $messages;
    }
}